//
//  CCDNavigationController.m
//  crowd
//
//  Created by 马腾飞 on 16/4/25.
//  Copyright © 2016年 caocaod.com. All rights reserved.
//

#import "CCDNavigationController.h"


@interface CCDNavigationController ()<UIGestureRecognizerDelegate>


@end

@implementation CCDNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    
//    if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
//        self.interactivePopGestureRecognizer.delegate = weakSelf;
//    }
    
    //    object_setClass(self.interactivePopGestureRecognizer, [UIPanGestureRecognizer class]);}
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
    // 判断是否为根据控制器，如果不是跟控制器酒把tabBar隐藏并添加返回按钮
    if (self.viewControllers.count) {
        // 隐藏TabBar
        //         YiHuoTabBarController *tab =
        //         (YiHuoTabBarController *)[UIApplication sharedApplication].delegate.window.rootViewController;
        //         [tab hideTabBar:YES];
        viewController.hidesBottomBarWhenPushed = YES;
        // 添加返回按钮
        //         viewController.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithNormalIcon:@"fanhui" highlightedIcon:@"fanhui" target:self action:@selector(backAction)];
    }
    
    [super pushViewController:viewController animated:animated];
}




@end
